home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / include / scribus-ng / pdflib.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-01-12  |  1.8 KB  |  72 lines

  1. /*
  2. For general Scribus (>=1.3.2) copyright and licensing information please refer
  3. to the COPYING file provided with the program. Following this notice may exist
  4. a copyright and/or license notice that predates the release of Scribus 1.3.2
  5. for which a new license (GPL+exception) is in place.
  6. */
  7.  
  8. #ifndef PDFLIB_H
  9. #define PDFLIB_H
  10.  
  11. #include "scconfig.h"
  12. #include "scribusapi.h"
  13.  
  14. #include <QObject>
  15. #include <QMap>
  16. #include <QPixmap>
  17. #include <vector>
  18.  
  19. class ScribusDoc;
  20.  
  21. /**
  22.  * PDFLib provides an interface to the core PDF export functionality of scribus.
  23.  * This class does not directly implement export; it's purpose is to isolate
  24.  * implementation details from the rest of the codebase.
  25.  *
  26.  * The real implementation is in pdflib_core.cpp .
  27.  */
  28. class SCRIBUS_API PDFlib : public QObject
  29. {
  30.     Q_OBJECT
  31.  
  32. public:
  33.     /**
  34.      * Instantiate a new PDFLib that will operate on `docu'.
  35.      *
  36.      * \warning current PDFLib implementations may not function correctly if re-used for
  37.      *          multiple exports. Create a new object for each job.
  38.      *
  39.      * \param docu Document to use in export process
  40.      */
  41.     explicit PDFlib(ScribusDoc & docu);
  42.  
  43.     ~PDFlib();
  44.  
  45.     /**
  46.      * Perform an export.
  47.      *
  48.      * \param fn Output file name
  49.      * \param nam ??
  50.      * \param Components ??
  51.      * \param pageNs List of pages from document to be exported as sequential PDF pages
  52.      * \param thumbs A mapping of input (document) page numbers to pre-rendered thumbnails.
  53.      */
  54.     bool doExport(const QString& fn, const QString& nam, int Components,
  55.                   const std::vector<int> & pageNs, const QMap<int,QPixmap> & thumbs);
  56.  
  57.     /**
  58.      * Return an error message in case export has failed.
  59.      */
  60.     const QString& errorMessage(void);
  61.     /**
  62.      * Return if export has been aborted
  63.      */
  64.     bool  exportAborted(void);
  65.  
  66. private:
  67.     /// A pointer to the real implementation of pdflib .
  68.     void* impl;
  69. };
  70.  
  71. #endif
  72.